import React, { Component } from 'react';
import styles from './index.less';
import { ExSeoket } from './webscoket';

export default class extends Component {
  state = {
    ws: null,
  };
  componentDidMount = () => {
    var ws = new ExSeoket({ url: 'ws://127.0.0.1:3000' });
    this.setState({ ws: ws });
    setInterval(() => {
      ws.sendMsg({
        type: 'unsubscribe',
        data: {
          type: 'orderConclude',
          userId: '111',
          uuid: '111',
        },
      });
    }, 2000);
  };

  render() {
    return <div>1111</div>;
  }
}
